﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Xna.Framework.Input;
using TileMapEditor.EditorForms;

namespace TileMapEditor
{
    public partial class TileEditor : Form
    {
        public int SelectedID 
        {
            get { return mapDisplay1.SelectedID; }
            set { mapDisplay1.SelectedID = value; }
        }
        
        public TileEditor()
        {
            InitializeComponent();
            Mouse.WindowHandle = panel1.Handle;
            SelectedID = 0;
        }

        public void SetMap(TileEngine.Map m) 
        {
            mapDisplay1.Map = m;
        }

        #region Menu Code

        //open new map dialog
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MapCreator mapCreator = new MapCreator(this);
            mapCreator.ShowDialog();

        }

        #endregion

        private void TileEditor_Load(object sender, EventArgs e)
        {

        }

        private void button6_Click(object sender, EventArgs e)
        {

        }

        private void closeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void showGridToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mapDisplay1.Map.Grid.SetVisibility();
        }

        private void p1_Click(object sender, EventArgs e)
        {
            SelectedID = 1;
        }

        private void SetTileSet() 
        {
           // p1.Image = new Bitmap();
        }

        
    }
}
